<template>
  <div ref="imageWrapper" class="IllegalSigning">
    <tabsBox :list="tabsList" :hasECharts="true" @eChartsShow="eChartsModalVisible = true"
     @click="tabsClickFun"></tabsBox> 
    <div class="searchBox">
      <a-row :gutter="2">
        <a-col :sm="24" :md="12" :lg="8" :xl="6" :xxl="6">
          <div class="searchBoxItem">
            <span>项目单位：</span>
            <div class="searchBoxItemCon">
              <projectUnitTree :value="params.projectUnit" ></projectUnitTree>
            </div>
          </div>
        </a-col>
        <a-col :sm="24" :md="12" :lg="8" :xl="6" :xxl="6">
          <div class="searchBoxItem">
            <span>数据范围：</span>
            <div class="searchBoxItemCon">
              <a-select v-model="params.value" style="width: 100%;" placeholder="请选择数据范围">
                <a-select-option :value="1">本单位数据</a-select-option>
                <a-select-option :value="2">本单位及以下数据</a-select-option>
              </a-select>
            </div>
          </div>
        </a-col>
        <a-col :sm="24" :md="12" :lg="8" :xl="6" :xxl="6">
          <div class="searchBoxItem">
            <span>指标筛选：</span>
            <div class="searchBoxItemCon">
              <a-button type="primary" @click="indicatorScreeningVisible = true;getSjModelFieldConfig()">点击查看</a-button>
            </div>
          </div>
        </a-col>
        <a-col :sm="24" :md="12" :lg="24" :xl="24" :xxl="6">
          <div style="float: right; overflow: hidden" class="searchBtnBox table-page-search-submitButtons">
            <a-button type="primary" @click="onSearch" icon="search" class="yellow_search_btn">分析</a-button>
            <a-button @click="searchReset" icon="reload" class="clear_btn"
              style="margin-left: 12px">清除条件</a-button>
            <a-button
              type="danger"
              :loading="ydLoading"
              @click="handleToYD(false)"
              icon="arrow-right"
              style="margin-left: 12px"
              >转疑点</a-button
            >
          </div>
        </a-col>
      </a-row>
    </div>
    <div class="tableBox">
      <div style="margin-bottom: 10px;">
        <a-button type="primary" @click="manualMatchingVisible = true;" class="yellow_search_btn">手动匹配</a-button>
      </div>
      <a-table :columns="tableColumns" :data-source="tableData" bordered rowKey="No" :scroll="{x: true}"
      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"></a-table>
    </div>

    <!-- 基本信息 弹窗 -->
    <a-modal
      :width="1000"
      title="基本信息"
      :visible="basicInformationVisible"
      :footer="false"
      @cancel="basicInformationVisible = false"
    >
      <div class="basicInformationItem" v-for="(item, index) in basicInformationData" :key="index">
        <div class="basicInformationItemHeader">
          <i class="basicInformationItemHeaderIcon"></i>
          <div class="basicInformationItemHeaderTxt">{{ item.title }}</div>
        </div>
        <div class="basicInformationItemContent">{{ item.content }}</div>
        <div class="basicInformationItemLine" v-if="index != (basicInformationData.length - 1)"></div>
      </div>
    </a-modal>

    <!-- 疑点规则 弹窗 -->
    <a-modal
      :width="800"
      title="疑点规则"
      :visible="doubtfulPointRulesVisible"
      :footer="false"
      @cancel="doubtfulPointRulesVisible = false"
    >
      <div class="doubtfulPointRulesItem" v-for="(item, index) in doubtfulPointRulesData" :key="index">
        {{ item }}
      </div>
    </a-modal>
    
    <!-- 数据完整性 弹窗 -->
    <a-modal
      :width="600"
      title="数据完整性"
      :visible="dataIntegrityVisible"
      :footer="false"
      @cancel="dataIntegrityVisible = false"
    >
      <div class="dataIntegrityItem" v-for="(item, index) in dataIntegrityData" :key="index">
        <div class="dataIntegrityItemL">
          <i class="dataIntegrityItemIcon" :class="{'dataIntegrityItemIcon_isUpload':item.status}"></i>
          <div class="dataIntegrityItemTxt">{{ item.name }}</div>
        </div>
        <div class="dataIntegrityItemBtn" v-if="item.status"
         @click="modelPopupVisible = true;modelPopupSelVal = index">查看</div>
      </div>
    </a-modal>

    <!-- 模型 弹窗 -->
    <a-modal
      :width="1550"
      :title="modelPopupData[modelPopupSelVal].title"
      :visible="modelPopupVisible"
      :footer="false"
      @cancel="modelPopupVisible = false"
    >
      <div class="modelPopupModal">
        <a-row class="modelPopupBox">
          <a-col class="modelPopupTitle" :span="24"
            v-for="(item, index) in modelPopupData[modelPopupSelVal].list1" :key="index">
            {{ item.title }}
          </a-col>
          <a-col class="modelPopupList" :span="item.span || 12"
            v-for="(item, index) in modelPopupData[modelPopupSelVal].list2" :key="index">
            <div class="modelPopupListTxt modelPopupListTxt1">{{ item.title }}</div>
            <div class="modelPopupListTxt modelPopupListTxt2">{{ item.value }}</div>
          </a-col>
        </a-row>
        <a-table :columns="modelPopupData[modelPopupSelVal].columns" :data-source="modelPopupData[modelPopupSelVal].data" bordered></a-table>
        <a-row class="modelPopupBox1" v-if="modelPopupData[modelPopupSelVal].list3 && modelPopupData[modelPopupSelVal].list3.length">
          <a-col class="modelPopupList" :span="item.span || 12"
            v-for="(item, index) in modelPopupData[modelPopupSelVal].list3" :key="index">
            <div class="modelPopupListTxt modelPopupListTxt1">{{ item.title }}:</div>
            <div class="modelPopupListTxt modelPopupListTxt2">{{ item.value || "无" }}</div>
          </a-col>
        </a-row>
      </div>
    </a-modal>

    <!-- 自定义阈值 指标筛选 弹窗 -->
    <a-modal
      :width="600"
      title="自定义阈值"
      :visible="indicatorScreeningVisible"
      @ok="save"
      @cancel="indicatorScreeningVisible = false"
    >
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">差异量（一般）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.difference_amount_general" />
          <span class="indicatorScreeningItemRightTxt indicatorScreeningItemRightTxt1">（件、吨、个、千克、升）</span>
        </div>
      </div>
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">差异量（中等）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.difference_amount_mediumt" />
          <span class="indicatorScreeningItemRightTxt indicatorScreeningItemRightTxt1">（件、吨、个、千克、升）</span>
        </div>
      </div>
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">差异量（偏高）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.difference_amount_high" />
          <span class="indicatorScreeningItemRightTxt indicatorScreeningItemRightTxt1">（件、吨、个、千克、升）</span>
        </div>
      </div>
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">性质（一般）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.property_general" />
          <span class="indicatorScreeningItemRightTxt">%</span>
        </div>
      </div>
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">性质（中等）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.property_mediumt" />
          <span class="indicatorScreeningItemRightTxt">%</span>
        </div>
      </div>
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">性质（偏高）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.property_high" />
          <span class="indicatorScreeningItemRightTxt">%</span>
        </div>
      </div>
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">总价差（一般）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.total_price_diff_general" />
          <span class="indicatorScreeningItemRightTxt">万元</span>
        </div>
      </div>
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">总价差（中等）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.total_price_diff_mediumt" />
          <span class="indicatorScreeningItemRightTxt">万元</span>
        </div>
      </div>
      <div class="indicatorScreeningItem">
        <div class="indicatorScreeningItemTxt">总价差（偏高）：</div>
        <div class="indicatorScreeningItemRight">
          <span class="indicatorScreeningItemRightTxt">大于</span>
          <a-input class="indicatorScreeningItemRightInput" v-model="indicatorScreeningData.total_price_diff_high" />
          <span class="indicatorScreeningItemRightTxt">万元</span>
        </div>
      </div>
    </a-modal>
    
    <!-- 手动匹配 弹窗 -->
    <a-modal
      :width="1000"
      title="手动匹配材料信息"
      :visible="manualMatchingVisible"
      :footer="false"
      @cancel="manualMatchingVisible = false"
    >
      <div class="modelPopupModal">
        <div class="modelPopupBox modelPopupBox2">
          <div class="modelPopupTitle">采购明细清单</div>
          <a-table :columns="manualMatchingColumns1" :data-source="manualMatchingData1" bordered>
            <span slot="actions" slot-scope="scope">
              <a-button type="danger" @click="correlationVisible = true">关联</a-button>
            </span>
          </a-table>
        </div>
      </div>
    </a-modal>

    <!-- 关联 弹窗 -->
    <a-modal
      :width="1000"
      title="关联"
      :visible="correlationVisible"
      @ok="correlationVisible = false"
      @cancel="correlationVisible = false"
    >
      <div class="modelPopupModal">
        <div class="modelPopupBtn">
          <div class="">物资名称：</div>
          <a-input style="width: 220px;" />
          <a-button type="primary" @click="onSearch" style="margin-left: 10px;"
          icon="search" class="yellow_search_btn">查询</a-button>
        </div>
        <div class="modelPopupBox modelPopupBox2">
          <div class="modelPopupTitle">发料明细清单</div>
          <a-table :columns="manualMatchingColumns2" :data-source="manualMatchingData2" bordered
            :row-selection="{ selectedRowKeys: correlationRowKeys, onChange: onCorrelationChange }">
          </a-table>
        </div>
      </div>
    </a-modal>
    
    <!-- 统计图表 弹窗 -->
    <a-modal
      :width="1200"
      title="统计图表"
      :visible="eChartsModalVisible"
      @ok="save"
      @cancel="eChartsModalVisible = false"
    >
      <div class="eChartsBox">
        <div class="eChartsItem"
        v-for="(item, index) in echartsList" :key="index">
          <div class="eChartsItemHeader">
            <i class="eChartsItemHeaderIcon" :style="`background-image: url(${item.icon})`"></i>
            <span class="eChartsItemHeaderTxt">{{ item.title }}</span>
          </div>
          <echarts class="eChartsItemEChart" :chartOpt="item.echartsOpt" :istrigger="istrigger"></echarts>
        </div>
      </div>
    </a-modal>

    <!-- 项目信息 弹窗 -->
    <projectInfoModal :visible="projectInfoVisible"
     @cancel="projectInfoVisible = false"></projectInfoModal>

    <!-- 转移点 -->
    <YDModel ref="YDModel" :router-data="$route.path" />
  </div>
</template>

<script>
import tabsBox from './components/tabsBox.vue';
import { numberOfExitsOpt, exitRatioOpt } from './js/echartsDataOpt.js'
import modelPopupData from './js/modelPopupData.js'
import echarts from '@/components/echarts.vue'
import { getAction, postAction, putAction } from '@/api/manage'
import YDModel from './components/YDModel'
import projectUnitTree from './components/projectUnitTree.vue'
import html2canvas from 'html2canvas'
import projectInfoModal from './components/projectInfoModal/index.vue'
export default {
  components: {
    tabsBox,
    echarts,
    YDModel,
    projectUnitTree,
    projectInfoModal,
  },
  data() {
    return {
      istrigger: false,
      ydLoading: false,
      params: {
        value: 1,
      },
      tableData: [
        { name1: '郑开城际延长线项目经理部',
          name2: '河南中粤通机械设备有限公司[91410728MA9NFXQR2T]',
          name3: '', name4: '辅材细分料1', name5: '0100000127514',
          name6: '圆钢', name7: 'Φ22', name8: '', name9: '米',
          name10: '50', name11: '24.27184466', name12: '1213.59',
          name13: '0.03', name14: '25', name15: '1250', name16: '50',
          name17: '24.27184466', name18: '1213.59', name19: '0',
          name20: '25', name21: '1250',
        },
        { name1: '郑开城际延长线项目经理部',
          name2: '河南中粤通机械设备有限公司[91410728MA9NFXQR2T]',
          name3: '', name4: '辅材细分料1', name5: '0101000080207',
          name6: '方钢', name7: '50×50', name8: '50×50×5，长1800mm', name9: '根',
          name10: '2', name11: '553.39805825', name12: '1106.8',
          name13: '0.03', name14: '570', name15: '1140', name16: '2',
          name17: '553.39805825 ', name18: '1106.8', name19: '0',
          name20: '570', name21: '1140',
        },
        { name1: '郑开城际延长线项目经理部',
          name2: '河南中粤通机械设备有限公司[91410728MA9NFXQR2T]',
          name3: '', name4: '辅材细分料1', name5: '0101000119050',
          name6: '方钢', name7: '5×10', name8: '50×50×5，长1200mm', name9: '根',
          name10: '2', name11: '368.93203883', name12: '737.86',
          name13: '0.03', name14: '380', name15: '760', name16: '2',
          name17: '368.93203883', name18: '737.86 ', name19: '0',
          name20: '380', name21: '760',
        },
        { name1: '郑开城际延长线项目经理部',
          name2: '河南中粤通机械设备有限公司[91410728MA9NFXQR2T]',
          name3: '', name4: '辅材细分料1', name5: '0101000119050',
          name6: '方钢', name7: '5×10', name8: '', name9: '根',
          name10: '2', name11: '257.42574257', name12: '514.85',
          name13: '0.01', name14: '260', name15: '520', name16: '2',
          name17: '257.42574257', name18: '514.85', name19: '0',
          name20: '260', name21: '520',
        },
        { name1: '郑开城际延长线项目经理部',
          name2: '河南中粤通机械设备有限公司[91410728MA9NFXQR2T]',
          name3: '', name4: '辅材细分料1', name5: '0101000119050',
          name6: '方钢', name7: '5×10', name8: '镀锌方钢', name9: '根',
          name10: '4', name11: '193.06930693', name12: '772.28',
          name13: '0.01', name14: '195', name15: '780', name16: '4',
          name17: '193.06930693', name18: '772.28', name19: '0',
          name20: '195', name21: '780',
        },
      ],
      selectedRowKeys: [],
      tableSelValue: 1,
      tableColumns: [
        {
          title: '序号',
          dataIndex: 'rowIndex',
          width: 65,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        { title: "项目部", dataIndex: "name1", key: "name1", width: 160 },
        { title: "供应商", dataIndex: "name2", key: "name2", width: 250 },
        { title: "用料单位", dataIndex: "name3", key: "name3", width: 100 },
        { title: "物资分类", dataIndex: "name4", key: "name4", width: 120 },
        { title: "物资编码", dataIndex: "name5", key: "name5", width: 120 },
        { title: "物资名称", dataIndex: "name6", key: "name6", width: 100 },
        { title: "规格型号", dataIndex: "name7", key: "name7", width: 100 },
        { title: "辅助规格", dataIndex: "name8", key: "name8", width: 120 },
        { title: "计量单位", dataIndex: "name9", key: "name9", width: 100 },
        { title: "采购数量", dataIndex: "name10", key: "name10", width: 100 },
        { title: "采购列账单价", dataIndex: "name11", key: "name11" },
        { title: "采购列账金额", dataIndex: "name12", key: "name12", width: 100 },
        { title: "采购材料税率", dataIndex: "name13", key: "name13", width: 100 },
        { title: "采购材料含税单价", dataIndex: "name14", key: "name14", width: 100 },
        { title: "采购材料含税金额", dataIndex: "name15", key: "name15", width: 100 },
        { title: "发料数量", dataIndex: "name16", key: "name16", width: 100 },
        { title: "发列账单价", dataIndex: "name17", key: "name17", width: 140 },
        { title: "发列账金额", dataIndex: "name18", key: "name18", width: 140 },
        { title: "发材料税率", dataIndex: "name19", key: "name19", width: 140 },
        { title: "发材料含税单价", dataIndex: "name20", key: "name20", width: 100 },
        { title: "发材料含税金额", dataIndex: "name21", key: "name21", width: 100 },
      ],
      echartsList: [
        {
          title: '供应商物资疑点数量',
          icon: require('../../assets/new_modal/1.png'),
          echartsOpt: {
            id: 'numberOfExitsECharts1',
            options: null,
          },
        },
        {
          title: '物资招标不规范疑点比例',
          icon: require('../../assets/new_modal/3.png'),
          echartsOpt: {
            id: 'numberOfExitsECharts2',
            options: null
          },
        },
      ],
      tabsList: [
        { title: '物资招标不规范', img: require('../../assets/new_modal/13.png') },
        { title: '模型说明', img: require('../../assets/new_modal/5.png') },
        { title: '疑点规则', img: require('../../assets/new_modal/4.png') },
        { title: '数据完整性', img: require('../../assets/new_modal/2.png') },
        { title: '项目信息', img: require('../../assets/new_modal/17.png') },
      ],
      basicInformationVisible: false,
      basicInformationData: [
        { value: 'mxdy', title: '模型定义' },
        { value: 'sjal', title: '实际案例' },
        { value: 'sjwt', title: '审计问题' },
        { value: 'wtdx', title: '问题定性' },
      ],
      doubtfulPointRulesVisible: false,
      doubtfulPointRulesData: [],
      dataIntegrityVisible: false,
      dataIntegrityData: [],
      modelPopupVisible: false,
      modelPopupSelVal: 0,
      modelPopupData,
      indicatorScreeningVisible: false,
      indicatorScreeningParams: {},
      indicatorScreeningData: {},
      manualMatchingVisible: false,
      manualMatchingColumns1: [
        {
          title: '序号',
          dataIndex: 'rowIndex',
          width: 65,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        { title: "物资编码", dataIndex: "name1", key: "name1" },
        { title: "物资名称", dataIndex: "name6", key: "name6" },
        { title: "规格型号", dataIndex: "name2", key: "name2" },
        { title: "辅助规格", dataIndex: "name3", key: "name3" },
        { title: "采购列账单价", dataIndex: "name7", key: "name7" },
        { title: "采购材料含税单价", dataIndex: "name4", key: "name4" },
        { title: "是否已匹配", dataIndex: "name5", key: "name5" },
        { title: "操作", dataIndex: "actions", key: "actions", scopedSlots: { customRender: 'actions' }, },
      ],
      manualMatchingData1: [
        { name1: '0100000127514', name6: '圆钢', name2: 'Φ22', name3: '', name7: '24.27184466', name4: '25', name5: '是' },
        { name1: '0101000080207', name6: '方钢', name2: '50×50', name3: '50×50×5，长1800mm', name7: '553.39805825', name4: '570', name5: '是' },
        { name1: '0101000119050', name6: '方钢', name2: '5×10', name3: '50×50×5，长1200mm', name7: '368.93203883', name4: '380', name5: '是' },
        { name1: '0101000119050', name6: '方钢', name2: '5×10', name3: '', name7: '257.42574257', name4: '260', name5: '是' },
        { name1: '0101000119050', name6: '方钢', name2: '5×10', name3: '镀锌方钢', name7: '193.06930693', name4: '195', name5: '是' },
        { name1: '0101000183527', name6: '方钢', name2: '40×20×2.0mm', name3: '150mm×150mm×5mm', name7: '101.7699115', name4: '115', name5: '是' },
      ],
      manualMatchingColumns2: [
        {
          title: '序号',
          dataIndex: 'rowIndex',
          width: 65,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        { title: "物资编码", dataIndex: "name1", key: "name1" },
        { title: "物资名称", dataIndex: "name2", key: "name2" },
        { title: "规格型号", dataIndex: "name3", key: "name3" },
        { title: "辅助规格", dataIndex: "name4", key: "name4" },
        { title: "发列账单价", dataIndex: "name5", key: "name5" },
        { title: "发材料含税单价", dataIndex: "name6", key: "name6" },
      ],
      manualMatchingData2: [
        { name1: '0100000127514', name2: '圆钢', name3: 'Φ22', name4: '', name5: '24.27184466', name6: '25' },
        { name1: '0101000080207', name2: '方钢', name3: '50×50', name4: '50×50×5，长1800mm', name5: '553.39805825', name6: '570' },
        { name1: '0101000119050', name2: '方钢', name3: '5×10', name4: '50×50×5，长1200mm', name5: '368.93203883', name6: '380' },
        { name1: '0101000119050', name2: '方钢', name3: '5×10', name4: '', name5: '257.42574257', name6: '260' },
        { name1: '0101000119050', name2: '方钢', name3: '5×10', name4: '镀锌方钢', name5: '193.06930693', name6: '195' },
        { name1: '0101000183527', name2: '方钢', name3: '40×20×2.0mm', name4: '150mm×150mm×5mm', name5: '101.7699115', name6: '115' },
      ],
      eChartsModalVisible: false,
      correlationVisible: false,
      correlationRowKeys: [],
      projectInfoVisible: false,
      url: {
        queryTemplateData: '/sjmx2/modelTemplateCollectConfig/queryTemplateData',
        editIndicator: '/sjmx/sjModelFieldConfig/edit',
        getModelTemplateConfig: '/sjmx2/modelTemplateConfig/queryById',
        getSjModelFieldConfig: '/sjmx/sjModelFieldConfig/queryModelField',
      },
    }
  },
  mounted() {
    this.getModelTemplateConfig();
    this.$set(this.echartsList[0].echartsOpt, 'options', numberOfExitsOpt({
      name: ['项目1', '项目2', '项目3', '项目4', '项目5', '项目6', '项目7'],
      value: ['10', '20', '30', '40', '50', '30', '20'],
    }));
    this.$set(this.echartsList[1].echartsOpt, 'options', exitRatioOpt([
      { value: 10, name: '分包队伍1' },
      { value: 10, name: '分包队伍2' },
      { value: 10, name: '分包队伍3' },
      { value: 10, name: '分包队伍4' },
      { value: 10, name: '分包队伍5' },
      { value: 10, name: '分包队伍6' },
      { value: 10, name: '分包队伍7' },
    ]));
    this.$nextTick(()=>{
      this.istrigger = !this.istrigger;
    })
  },
  methods: {
    onCorrelationChange(e) {
      this.correlationRowKeys = e;
    },
    queryTemplateData() {
      getAction(this.url.queryTemplateData, {id: 'wzzbbgf'}).then((res)=>{
        if(res.code == 200) {
          this.dataIntegrityData = res.result
        }
      })
    },
    onSearch() {

    },
    save() {
      let projectJson =JSON.stringify(this.indicatorScreeningData)
      this.editIndicator(projectJson);
      this.visible = false
    },
    // 保存已经修改的projectJson(子组件返回json串)
    editIndicator(projectJson) {
      let queryParam = {
        id: this.indicatorScreeningParams.id,
        modelId: "wzzbbgf",
        projectJson,
      };
      putAction(this.url.editIndicator, queryParam).then((res) => {
        this.$message.success('保存成功');
        this.indicatorScreeningVisible = false;
      })
    },
    getSjModelFieldConfig() {
      getAction(this.url.getSjModelFieldConfig, {modelId: 'wzzbbgf'}).then((res)=>{
        this.indicatorScreeningData = JSON.parse(res.result.projectJson);
        this.indicatorScreeningParams = res.result;
      })
    },
    getModelTemplateConfig() {
      getAction(this.url.getModelTemplateConfig, {id: 'wzzbbgf'}).then((res)=>{
        let jbxx = JSON.parse(res.result.jbxx);
        for(let key in jbxx) {
          for(let i=0;i<this.basicInformationData.length;i++) {
            let item = this.basicInformationData[i];
            if(item.value == key) {
              this.$set(this.basicInformationData[i], 'content', jbxx[key]);
            }
          }
        }
        this.doubtfulPointRulesData = [res.result.ydgz]
      })
    },
    tabsClickFun(e) {
      if(e == 0) {
      }else if(e == 1) {
        this.basicInformationVisible = true;
      }else if(e == 2) {
        this.doubtfulPointRulesVisible = true;
      }else if(e == 3) {
        this.dataIntegrityVisible = true;
        this.queryTemplateData();
      }else if(e == 4) {
        this.projectInfoVisible = true;
      }
    },
    onSearch() {

    },
    searchReset() {

    },
    handleToYD() {
      this.ydLoading = true
      let time = '[物资招标不规范]'
      let ydnr = '此项目存在【物资招标不规范】类似疑点信息。'
      let gzzd = undefined
      html2canvas(this.$refs.imageWrapper).then((canvas) => {
        let dataURL = canvas.toDataURL('image/png')
        console.log('父组件调用完了')
        // this.$refs.YDModel.show()
        this.$refs.YDModel.show({}, dataURL, ydnr, time, gzzd)
        this.ydLoading = false
      })
    },
    onSelectChange(e) {
      this.selectedRowKeys = e;
    }
  }
}
</script>

<style lang="less" scoped>
.IllegalSigning {
  .searchBox {
    padding: 0 25px;
    margin-top: 15px;
    background: inherit;
    background-color: rgba(255, 255, 255, 1);
    border-radius: 50px;
  }
  .searchBoxItem {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 0;
    span {
      text-align: right;
      width: 80px;
    }
    .searchBoxItemCon {
      flex: 1;
    }
  }
  .searchBtnBox {
    padding: 10px 0;
    display: flex;
    align-items: center;
  }
  .tableBox {
    padding: 25px;
    margin-top: 15px;
    border-radius: 40px;
    background-color: #ffffff;
  }
  .eChartsBox {
    margin-top: 15px;
    display: grid;
    grid-gap: 15px;
    grid-template-columns: repeat(2, 1fr);
  }
  .eChartsItem {
    padding: 25px;
    border-radius: 30px;
    background-color: #ffffff;
  }
  .eChartsItemHeader {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  .eChartsItemHeaderIcon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  .eChartsItemHeaderTxt {
    margin-left: 10px;
    font-size: 20px;
    color: #3154A4;
    font-family: 'Arial Normal', 'Arial', sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: normal;
    line-height: normal;
  }
  .eChartsItemEChart {
    height: 288px;
  }
}
.basicInformationItem {
  .basicInformationItemHeader {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  .basicInformationItemHeaderIcon {
    display: inline-block;
    width: 6px;
    height: 18px;
    background-color: rgba(49, 84, 164, 1);
    margin-right: 10px;
  }
  .basicInformationItemHeaderTxt {
    font-size: 18px;
    font-family: 'Arial Normal', 'Arial', sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: normal;
    color: #333333;
    line-height: normal;
  }
  .basicInformationItemContent {
    margin-top: 15px;
    font-family: 'Arial Normal', 'Arial', sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: normal;
    color: #333333;
    font-size: 14px;
    text-align: left;
    line-height: 25px;
  }
  .basicInformationItemLine {
    width: 100%;
    height: 1px;
    background-color: #3154A4;
    margin: 15px 0;
  }
}
.doubtfulPointRulesItem {
  font-family: 'Arial Normal', 'Arial', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  text-align: left;
  letter-spacing: normal;
  color: #333333;
  text-indent:2em;
  line-height: 25px;
}
.dataIntegrityItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  &:last-child {
    margin-bottom: 0;
  }
  .dataIntegrityItemL {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }
  .dataIntegrityItemIcon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('../../assets/new_modal/u1146.svg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  .dataIntegrityItemIcon_isUpload {
    background-image: url('../../assets/new_modal/u11.svg');
  }
  .dataIntegrityItemTxt {
    font-size: 14px;
    text-align: left;
    line-height: normal;
    letter-spacing: normal;
    color: #333333;
    font-family: 'Arial Normal', 'Arial', sans-serif;
    font-weight: 400;
    font-style: normal;
  }
  .dataIntegrityItemBtn {
    cursor: pointer;
    color: #3154A4;
    font-size: 14px;
    text-align: left;
    font-family: 'Arial Normal', 'Arial', sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: normal;
    line-height: normal;
  }
}
.indicatorScreeningItem {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 15px;
  &:last-child {
    margin-bottom: 0;
  }
  .indicatorScreeningItemTxt {
    width: 120px;
    text-align: right;
  }
  .indicatorScreeningItemRight {
    width: calc(100% - 120px);
  }
  .indicatorScreeningItemRightTxt {
    display: inline-block;
    width: 40px;
    text-align: center;
  }
  .indicatorScreeningItemRightTxt1 {
    width: auto;
  }
  .indicatorScreeningItemRightInput {
    width: 30%;
  }
}
.modelPopupModal {
  .modelPopupBox {
    border-top: 1px solid #dadada;
    border-right: 1px solid #dadada;
    .modelPopupTitle {
      padding: 5px 0;
      text-align: center;
      border: 1px solid #dadada;
      border-top-width: 0;
      border-right-width: 0;
      background-color: #F2F2F2;
      font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
      font-weight: 700;
      font-style: normal;
      font-size: 18px;
    }
    .modelPopupList {
      display: flex;
      justify-content: center;
      align-items: center;
      border: 1px solid #dadada;
      border-top-width: 0;
      border-right-width: 0;
      &:last-child {
        border-bottom-width: 0;
      }
      .modelPopupListTxt {
        width: 50%;
        padding: 5px;
      }
      .modelPopupListTxt1 {
        background-color: #F2F2F2;
      }
      .modelPopupListTxt2 {
        background-color: #ffffff;
      }
    }
  }
  .modelPopupBox1 {
    border-right: 1px solid #dadada;
    .modelPopupList {
      display: flex;
      justify-content: center;
      align-items: center;
      border: 1px solid #dadada;
      border-top-width: 0;
      border-right-width: 0;
      .modelPopupListTxt {
        width: 50%;
        padding: 5px;
      }
      .modelPopupListTxt1 {
        background-color: #F2F2F2;
      }
      .modelPopupListTxt2 {
        background-color: #ffffff;
      }
    }
  }
  .modelPopupBox2 {
    border-right: none;
    .modelPopupTitle {
      border-right-width: 1px;
    }
  }
  .ant-table-thead > tr > th .ant-table-header-column {
    white-space: nowrap;
  }
}
.modelPopupBtn {
  margin: 40px 0 20px;
  display: flex;
  align-items: center;
}
.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
  background: #3154a4;
  border-color: #3154a4;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before {
  background-color: #3154a4;
}
.eChartsBox {
  margin-top: 15px;
  display: grid;
  grid-gap: 15px;
  grid-template-columns: repeat(2, 1fr);
  .eChartsItem {
    border-radius: 30px;
    background-color: #ffffff;
  }
  .eChartsItemHeader {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  .eChartsItemHeaderIcon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  .eChartsItemHeaderTxt {
    margin-left: 10px;
    font-size: 20px;
    color: #3154A4;
    font-family: 'Arial Normal', 'Arial', sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: normal;
    line-height: normal;
  }
  .eChartsItemEChart {
    height: 288px;
  }
}
</style>